package com.inspur.jxpcxt.adapter;


import com.inspur.jypcxt.R;

import android.content.Context;
import android.graphics.Color;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;

public class AssessGradeAdapter extends BaseAdapter {
	private Context mContext = null;
	
	public AssessGradeAdapter(Context context) {
		super();
		// TODO Auto-generated constructor stub
		mContext = context;
	}

	@Override
	public int getCount()
		{
			// TODO Auto-generated method stub
			return 4;
		}

	@Override
	public Object getItem(int position)
		{
			// TODO Auto-generated method stub
			return null;
		}

	@Override
	public long getItemId(int position)
		{
			// TODO Auto-generated method stub
			return position;
		}

	@Override
	public View getView(int position, View convertView, ViewGroup parent)
		{
			// 创建一个LinearLayout，并向其中添加2个组件
			LinearLayout line = new LinearLayout(mContext);
			line.setOrientation(0);
			ImageView image = new ImageView(mContext);
			image.setImageResource(R.drawable.ic_launcher);
			EditText text = new EditText(mContext);
			text.setText("第" + (position +1 ) + "个列表项");
			text.setTextSize(20);
			text.setTextColor(Color.RED);
			line.addView(image);
			line.addView(text);
			// 返回LinearLayout实例
			return line;
		}

}
